<!DOCTYPE html >
<html>
	<head>
		<title>李小程博客</title>
		<link rel="stylesheet" type="text/css" href="/css/common_v2.css?v=1.0"/>
		<link rel="stylesheet" type="text/css" href="/css/read_v2.css?v=1.0"/>
		<script type="text/javascript" src="/js/jquery.min.js?v=1.0"></script>
		<script type="text/javascript" src="/js/common_v2.js?v=1.0"></script>
		<?php w('Common/common_meta'); ?>
        
	</head>

	<body>

		<!--头部-->
		<?php w('Common/common_head'); ?>
		<!--头部-->

		<!--主体-->
		<div id="L_body">
			<div id="L_header_left" >

				<div id="read-post_main">

					<h2><?php echo $cons['post_title']; ?></h2>

					<p class="date" >
						发布于：<?php echo $cons['add_time']?date('Y-m-d H:i',$cons['add_time']):'[未知时间]'; ?> |
						阅读数：<?php echo $cons['read_num']?:'0'; ?> |
						分类：<?php
                            $type_info = $cons['post_type']?(isset($post_type_info[$cons['post_type']])?$post_type_info[$cons['post_type']]:[]):[];
                            if($type_info){
                                //二级
                                if($type_info['fid']){
                                    echo '<a class="contentTypes" href="/Pub/lists/postType/'.$type_info['fid'].'.html">'.$type_info['fid_name'].'</a> - <a class="contentTypes" href="/Pub/lists/postType/'.$type_info['id'].'.html">'.$type_info['name'].'</a>';
                                }else{
                                    echo '<a class="contentTypes" href="/Pub/lists/postType/'.$type_info['id'].'.html">'.$type_info['name'].'</a>';
                                }
                            }else{
                                echo '[空]';
                            }
                        ?>
					</p>

					<div class="mainContents">
						<a name="read" ></a>
						<?php echo htmlspecialchars_decode($cons['post_contents']); ?>
						<br />
						<p title="扫码手机阅读" id="qrcodeCanvas"></p>
					</div>

					<div class="date-ext">
                        本文地址：<input type="text" class="contentUrl" value="http://www.lixiaocheng.com/Pub/read/id/<?php echo $cons['id']; ?>.html" style="width: 360px;" onfocus="$(this).select();" />
						<br />
						标签：<?php if(empty($tag_list)){ ?>
						<a href="javascript:void(0);">[无]</a>
						<?php }else{ foreach($tag_list as $v){ ?>
						<a href="/Pub/lists.html?tag=<?php echo $v['name']; ?>" class="contentUrl"><?php echo $v['name']; ?></a>
						<?php } } ?>
					</div>
					
					<div id="bg-reply-add">
						<ul class="reply_ul" >
							
                            <li class="reply_li_headtab">
                                <table class="reply_li">
                                    <tr>
                                        <td class="reply_li_left">
                                            <img src="/img/comment.jpg" class="user_img" />
                                        </td>
                                        <td class="reply_li_right">
                                            <form action="/Pub/reply_add?content_id=<?php echo $cons['id']; ?>" method="POST">
                                                <input type="text" class="reply_add_input" name="user_name" value="" placeholder="👦您的称呼[选填]" />
                                                <input type="text" class="reply_add_input" name="user_email" value="" placeholder="✉您的邮箱[选填]" />
                                                <input type="text" class="reply_add_input" name="user_website" value="" placeholder="🌏您的网站[选填]" />
                                                <br/>
                                                <textarea class="reply_add_content" name="reply_contents" rows="3" placeholder="📅评论内容[必填]"></textarea>
                                                <br />
                                                <input type="submit" value="提交" />
                                            </form>
                                        </td>
                                    </tr>
                                </table>
                            </li>
                            
							<?php if(empty($comment_list)){  ?>

							<li class="reply_li reply-empty" >
								<div colspan="2" style="text-align: center;">
									[暂无评论]
								</div>
							</li>

							<?php }else{ foreach($comment_list as $v){?>

							<li class="reply_li" >
								<div class="reply_li_left">
									<img src="/img/comment.jpg" class="user_img" />
								</div>
								<div class="reply_li_right">
									<div class="comment-header">
                                        <?php if($v['user_name']){ ?>
										<span>👦：<?php echo $v['user_name']?:'&nbsp;'; ?></span> &nbsp; 
                                        <?php } if($v['user_email']){ ?>
                                        <span>✉：<?php echo $v['user_email']?:'&nbsp;'; ?></span> &nbsp; 
                                        <?php } if($v['user_website']){ ?>
                                        <span>🌏：<?php echo $v['user_website']?:'&nbsp;'; ?></span> 
                                        <?php } ?>
									</div>
									<p>
										<?php echo $v['reply_contents']?:'&nbsp;'; ?>
									</p>
									<div class="comment-footer">
										<span><?php
                                            if($v['reply_time']){
                                                echo date('Y-m-d H:i',$v['reply_time']);
                                            }
                                        ?></span>
									</div>
								</div>
							</li>

							<?php } } ?>
						</ul>
					</div>
                    
                    
				</div>
			</div>
		</div>
		<!--主体-->

		<!--底部-->
		<?php w('Common/common_footer'); ?>
		<!--底部-->
        
	</body>
</html>